package cn.iocoder.yudao.module.engine;

import cn.iocoder.yudao.framework.server.NettyWsServerBoot;
import cn.iocoder.yudao.module.engine.monitor.DirectMemoryMonitor;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;

import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

/**
 * app启动初始化类
 *
 * @author: wds_prc
 * @since: 2024/7/9 23:02
 */
@Service
@Slf4j
public class AppStarterService {

    @Resource
    private ApplicationContext context;

    @PostConstruct
    public void init() {
        //DirectMemoryMonitor.start();
        NettyWsServerBoot.startWebSocketServer(context);
    }

}
